<template>
    <view class="My">
        <view class="My">
            <AtNoticebar marquee>
                欢迎使用 Taro UI Vue
            </AtNoticebar>
            <AtButton
                type="primary"
                :on-click="handleClick"
            >
                AtButton
            </AtButton>
            <AtToast :is-opened="show" :text="msg" :on-close="handleClose"></AtToast>
        </view>
        <AtIcon value='clock' size='30' color='#F00'></AtIcon>
    </view>
</template>

<script>
// 按需引入, 更小的应用体积
import { AtButton, AtToast, AtNoticebar, AtIcon  } from 'taro-ui-vue'
import './index.scss'
export default {
    components: {
        AtButton,
        AtToast,
        AtNoticebar
    },
    data () {
        return {
            msg: 'Hello world!',
            show: false
        }
    },
    methods: {
        handleClick () {
            this.show = true
        },
        handleClose () {
            this.show = false
        }
    },
}
</script>
